package com.exam.role.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import com.exam.role.model.Module;
import com.exam.role.model.Role;
import com.exam.role.model.RoleModule;
import com.exam.role.model.Student;
import com.exam.role.model.Teacher;
import com.exam.util.Pagetools;

public interface RoleDao {
	public List<Module> findMenusByPage(Module module, Pagetools page);

	public List<Module> findSubMenus();

	public void saveOrUpdate(Object obj);

	public Module findMenuById(Integer id);

	public List<Role> findRolesByPage(Role role, Pagetools page);

	public List<Module> getMenuByRole(int roleId);

	public List<Student> getStudentByRole(int roleId, Student student,
			Pagetools page);

	public List<Teacher> getTeacherByRole(int roleId, Teacher teacher,
			Pagetools page);

	public List<Module> getMenus();

	public Object getById(Class cls, Serializable id);

	public void saveAll(Collection list);

	public void deleteAll(Collection list);

	public List<RoleModule> getRoleModulesByRole(int roleId);

	public List<Teacher> findTeachersByPage(int roleId, Teacher teacher,
			Pagetools page);

	public List<Student> findStudentsByPage(int roleId, Student student,
			Pagetools page);
}
